/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package objective;

import java.util.LinkedList;
import java.util.List;

/**
 *
 * @author daz
 */
public class ObjectiveSystem {

    private int violationDegrees;
    private List<IObjective> listObjectives;

    public ObjectiveSystem() {
        listObjectives = new LinkedList<IObjective>();
    }

    public void post(IObjective objective) {
        listObjectives.add(objective);
    }

    public void close() {
        violationDegrees = 0;
        for (IObjective objective : listObjectives) {
            violationDegrees += objective.getViolateDegrees();
        }
    }

    public int getViolationDegrees() {
        return violationDegrees;
    }

    public int getViolationAtValue(int value) {
        return 0;
    }
}
